home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amoszine 8
/
Amoszine 8 (Disk 2 of 3).adf
/
Powerbobs.lha
/
powerbobsv1.0
/
examples
/
Pinc_With_Range.asc
< prev
next >
Wrap
Text File
|
1992-09-02
|
714b
|
38 lines
'This example shows the use of the Pinc command using a range.
'Read the docfile for (un)setting a range when using other array arithmetics.
'Beware...if more than 300 is entered, be sure to have a cup of tea.
'
'Two array's containing 1001 elements (0 -> 1000) are first Dimensioned.
'
'Enter 0 (zero) to stop the speed test.
'
Dim X(1000)
Do
Input "Give range, max 1000 : ";_MAX
'
If _MAX=0 Then End
'
T=Timer
For I=1 To 1000
For K=0 To _MAX
Add X(K),1,1 To 20
Next
Next
'
'Display the ellapsed time in Vbl's
'
Print Timer-T
'
ADRESS_X=Varptr(X(0))
Set Pinc Range 1 To 20
T=Timer
For I=1 To 1000
Pinc ADRESS_X,1 To _MAX
Next
'
'Display the ellapsed time in Vbl's
'
Print Timer-T
'
Loop